home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Development Tools & Languages / DTSCPlusLibrary / Sources / KeyMap.h < prev    next >
Encoding:
Text File  |  1993-01-14  |  1.7 KB  |  62 lines  |  [TEXT/MPS ]

  1. /* _________________________________________________________________________________________________________ //
  2.   Copyright © 1992 Apple Computer, Inc. All rights reserved.
  3.   Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
  4.   Originator: Kent Sandvik
  5.   Date: 9/20/92
  6.   Revision comments are at the end of this file.
  7.   ---
  8.   TKeyMap is a KeyMap utility class.
  9.   TKeyMap.h contains the header file information for the TKeyMap class construction.
  10.   _________________________________________________________________________________________________________ */
  11.  
  12. // Declare label for this header file
  13. #ifndef _KEYMAP_
  14. #define _KEYMAP_
  15.  
  16. #ifndef _DTSCPLUSLIBRARY_
  17. #include "DTSCPlusLibrary.h"
  18. #endif
  19.  
  20. #ifndef __EVENTS__
  21. #include "Events.h"
  22. #endif
  23.  
  24. #ifndef __TOOLUTILS__
  25. #include <ToolUtils.h>
  26. #endif
  27.  
  28.  
  29. // _________________________________________________________________________________________________________ //
  30. //    Class Interface
  31.  
  32. class TKeyMap
  33. // TKeyMap is a utility class for manipulation of the KeyMap information.
  34. {
  35. public:
  36.     //    CONSTRUCTORS & DESTRUCTORS
  37.     TKeyMap();
  38.     virtual~ TKeyMap();
  39.  
  40.     //    MAIN INTERFACES
  41.     virtual Boolean OptionKeyDown();            // test if option key is down
  42.     virtual Boolean CommandKeyDown();            // test if command key is down
  43.     virtual Boolean ShiftKeyDown();                // test if shift key is down
  44.     virtual Boolean IsKeyDown(unsigned short key);// test if any key is down
  45.  
  46.     //    FIELDS
  47. protected:
  48.     KeyMap fKeyMap;                                // caches the keymap structure
  49. };
  50.  
  51.  
  52. #endif _KEYMAP_
  53.  
  54. // _________________________________________________________________________________________________________ //
  55.  
  56.  
  57. /*    Change History (most recent last):
  58.   No            Init.        Date            Comment
  59.   1            khs        9/20/92        New file
  60. */
  61.  
  62.